<script setup>
  const onClickDev = () =>{
    console.log("onClickDev")
  }
</script>

<template>
  <div @click="onClickDev">
    <a href="https://baidu.com" @click.prevent.stop="">百度一下</a>
  </div>
</template>

<style scoped>
div {
  width: 400px;
  height: 200px;
  background: plum;
}

div a {
  display: block;
  width: 100px;
  text-decoration: none;
  background: tomato;
  text-align: center;
  color: #fff;
}

div p {
  width: 200px;
  height: 100px;
  background: rebeccapurple;
}

</style>
